package com.jiyun.feign;

import com.github.pagehelper.PageInfo;
import com.jiyun.vo.Result;
import com.jiyun.vo.day12.RivalDto;
import com.jiyun.vo.day12.RivalDto2;
import com.jiyun.vo.day12.RivalVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author mtt
 * @Date 2023/8/23 19：11
 **/
@FeignClient("day05-rival")
public interface FeignRival {
    @RequestMapping("/rivalMember/findCount")
    public Result findCount(@RequestBody RivalDto dto);
    //C端展示效果
    @RequestMapping("/rival/findCAll")
    public PageInfo<RivalVo> findCAll(@RequestBody RivalDto2 dto);

    //C端展示单个成员与竞赛的详情
    @RequestMapping("/rival/findById/{id}")
    public RivalVo findById(@PathVariable("id") String id);

    //C端报名成功之后在RivalMember中间表中添加一条数据
    @RequestMapping("/rivalMember/addRivalMember/{id}")
    public void addRivalMember(@PathVariable("id") String id);
}
